﻿#ifndef _PT_MBUS_CLI_H_
#define _PT_MBUS_CLI_H_

#define PT_MBUS_CLIENT_COUNT_MAX (30)
#define PT_MBUS_CLIENT_ITEM_COUNT_MAX (20)

typedef struct {
	void *user_data;
	pt_mbus_callback_t cbk;
	pt_bool_t vaild;
	int sItemIndex;
}pt_mbus_client_item_t;

typedef struct {
	pt_mbus_client_item_t* client[PT_MBUS_CLIENT_ITEM_COUNT_MAX]; //保存client的指针，注册一个server最多有DATA_SERVER_WITH_CLIENT_COUNT_MAX client
	int itemcCount; //当前clinet的个数
}pt_mbus_topic_item_t;

int pt_mbus_add_client(int topic_id, pt_mbus_client_item_t* cItem);
void pt_mbus_remove_client(int topic_id, pt_mbus_client_item_t* cItem);
#endif
